package com.hmall.item;

import com.hmall.common.annotation.EnableHeaderConfig;
import com.hmall.common.clients.ItemClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@MapperScan("com.hmall.item.mapper")
@SpringBootApplication
//@EnableFeignClients(basePackages = "com.hmall.common.clients")
@EnableFeignClients(clients = {ItemClient.class})
@EnableHeaderConfig
public class ItemApplication {
    public static void main(String[] args) {
        SpringApplication.run(ItemApplication.class, args);
    }
    //配置消息转换器
    /*@Bean
    public MessageConverter jsonMessageConverter(){
        return new Jackson2JsonMessageConverter();
    }*/
}
